﻿using DZParallelLib.Utility;
using System;
using System.IO;

namespace DumpDZFile
{
    class Program
    {
        /// <summary>
        /// Dump a simple DZ file
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            var f = new FileInfo(args[0]);
            if (!f.Exists)
            {
                Console.WriteLine("Unable to open {0}.", f.FullName);
                return;
            }

            //
            // Load it up.
            //

            var c = DZIO.LoadDZ(f);
            int index = 0;
            foreach (var item in c.Items)
            {
                Console.WriteLine("{0} - {1}", index, item.Source);
                index++;
            }

        }
    }
}
